#ifndef CURVE_FITTING_VERTEX_H
#define CURVE_FITTING_VERTEX_H

#include <iostream>
#include <g2o/core/base_vertex.h>
#include <g2o/core/hyper_graph_action.h>

using namespace std;
using namespace Eigen;

class CurveFittingVertex : public g2o::BaseVertex<3, Vector3d>
{
public:
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW

    virtual void setToOriginImpl() override
    {
        _estimate << 0, 0, 0;
    }

    virtual void oplusImpl(const double *update) override
    {
        _estimate += Vector3d(update);
    }

    virtual bool read(istream &in) override { return false; }
    virtual bool write(ostream &out) const override { return false; }
};

#endif
